package BehavioralMode.iterator.StudentDemo;

import java.util.LinkedList;
import java.util.List;

public class ConcreteAggregate implements AbstractagAggregate{

    List<Student> studentList = new LinkedList<>();


    @Override
    public void addEle(Student student) {
         studentList.add(student);
    }

    @Override
    public void remove(int postion) {
         studentList.remove(postion);
    }

    @Override
    public AbstractIterator getIterator() {
       return (AbstractIterator) new ConcreteIterator(studentList);
    }
}
